<?php

namespace addons\zzuser\service;

class EncryptS
{
    public static function token($str): string
    {
        $config = config('token');
        return hash_hmac($config['hashalgo'], $str, $config['key']);
    }

    public static function password($str, $salt): string
    {
        return md5(md5($str) . $salt);
    }
}
